/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package design_mode;


/**
 *
 * @author root
 */
public class Design_mode {

    /**
     * 静态（简单）工厂
     * @param args the command line arguments
     */
//    public static void main(String[] args) {
//        ICreate create1=Factory.generatorCreate("people");
//        ICreate create2=Factory.generatorCreate("animal");
//        create1.Create();
//        create2.Create();
//    }
    
    
    /**
     * 工厂方法
     * @param args 
     */
//    public static void main(String[] args){
//        ICreateFactory factory1 = new AnimalFactory();
//        factory1.createInstance().Create();
//        ICreateFactory factory2 = new PeopleFactory();
//        factory2.createInstance().Create();
//    }
    
    
    /**
     * 抽象工厂
     * @param args 
     */
    public static void main(String[] args){
        factoryMode.abstractFactory.ICreateFactory factory = new factoryMode.abstractFactory.AsiaFactory();
        factory.createAnimal();
        factory.createPeople();
    }
}
